package org.dtrevien.metamodel.java;

import java.util.ArrayList;

import org.dtrevien.metamodel.java.visitor.Visitor;

public class Systeme {

	protected ArrayList<Classe> classes;
	protected ArrayList<String> notes;

	public Systeme() {
		this.classes = new ArrayList<Classe>();
		this.notes = new ArrayList<String>();
	}

	public ArrayList<Classe> getClasses() {
		return this.classes;
	}

	public Classe getClasse(String name) {
		for (Classe c : this.classes) {
			if (c.getName().toLowerCase().equals(name.toLowerCase()))
				return c;
		}
		return null;
	}

	public void setClasses(ArrayList<Classe> classes) {
		this.classes = classes;
	}

	public boolean add(Classe c) {
		if (!this.classes.contains(c))
			return this.classes.add(c);
		return false;
	}

	public ArrayList<String> getNotes() {
		return this.notes;
	}

	public void setNotes(ArrayList<String> notes) {
		this.notes = notes;
	}

	public void accept(Visitor v) {
		v.visiteSystem(this);
	}
}
